﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;

namespace MyDapperApi.Models;

/// <summary>
/// 表单主数据: 合同主表 formtable_main_16
/// </summary>
[Table("formtable_main_16")]
public class OaContractEntity
{
    // C# 属性对应 SQL Server 字段

    /// <summary>
    /// 主键ID (系统自增)
    /// </summary>
    [Column("id")]
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    [Display(Name = "主键ID")]
    public int Id { get; set; }

    /// <summary>
    /// 请求ID / 流程编号
    /// </summary>
    [Column("requestId")]
    [Display(Name = "请求ID")]
    public int? RequestId { get; set; }

    /// <summary>
    /// 合同编号
    /// </summary>
    [Column("htbh")]
    [StringLength(200)]
    [Display(Name = "合同编号")]
    public string? Htbh { get; set; }

    /// <summary>
    /// 申请人 (人员ID)
    /// </summary>
    [Column("sqr")]
    [Display(Name = "申请人")]
    public int? Sqr { get; set; }

    /// <summary>
    /// 申请日期 (char(10) 格式)
    /// </summary>
    [Column("sqrq")]
    [StringLength(10)]
    [Display(Name = "申请日期")]
    public string? Sqrq { get; set; }

    /// <summary>
    /// 申请人部门 (部门ID)
    /// </summary>
    [Column("bm")]
    [Display(Name = "所属部门")]
    public int? Bm { get; set; }

    /// <summary>
    /// 申请人公司 (公司ID)
    /// </summary>
    [Column("gs")]
    [Display(Name = "所属公司")]
    public int? Gs { get; set; }

    /// <summary>
    /// 申请状态 (如：流程状态)
    /// </summary>
    [Column("sqzt")]
    [Display(Name = "申请状态")]
    public int? Sqzt { get; set; }

    /// <summary>
    /// 合同类型
    /// </summary>
    [Column("htlx")]
    [Display(Name = "合同类型")]
    public int? Htlx { get; set; }

    /// <summary>
    /// 是否框架协议
    /// </summary>
    [Column("sfkjxy")]
    [Display(Name = "是否框架协议")]
    public int? Sfkjxy { get; set; }

    /// <summary>
    /// 预算情况
    /// </summary>
    [Column("ysqk")]
    [Display(Name = "预算情况")]
    public int? Ysqk { get; set; }

    /// <summary>
    /// 合同名称
    /// </summary>
    [Column("htmc")]
    [StringLength(200)]
    [Display(Name = "合同名称")]
    public string? Htmc { get; set; }

    /// <summary>
    /// 签约类别
    /// </summary>
    [Column("qylb")]
    [Display(Name = "签约类别")]
    public int? Qylb { get; set; }

    /// <summary>
    /// 签约日期 (char(10) 格式)
    /// </summary>
    [Column("qyrq")]
    [StringLength(10)]
    [Display(Name = "签约日期")]
    public string? Qyrq { get; set; }

    /// <summary>
    /// 起始日期 (char(10) 格式)
    /// </summary>
    [Column("qsrq")]
    [StringLength(10)]
    [Display(Name = "起始日期")]
    public string? Qsrq { get; set; }

    /// <summary>
    /// 结束日期 (char(10) 格式)
    /// </summary>
    [Column("jsrq")]
    [StringLength(10)]
    [Display(Name = "结束日期")]
    public string? Jsrq { get; set; }

    /// <summary>
    /// 合同约定期限（天数/月数）
    /// </summary>
    [Column("htydqx", TypeName = "decimal(38, 2)")]
    [Display(Name = "约定期限")]
    public decimal? Htydqx { get; set; }

    /// <summary>
    /// 我方公司名称 (公司ID)
    /// </summary>
    [Column("wfgsmc")]
    [Display(Name = "我方公司")]
    public int? Wfgsmc { get; set; }

    /// <summary>
    /// 我方指定联系邮箱
    /// </summary>
    [Column("wfgszdlxyx")]
    [StringLength(200)]
    [Display(Name = "我方联系邮箱")]
    public string? Wfgszdlxyx { get; set; }

    /// <summary>
    /// 我方公司联系人 (人员ID)
    /// </summary>
    [Column("wfgslxr")]
    [Display(Name = "我方联系人")]
    public int? Wfgslxr { get; set; }

    /// <summary>
    /// 对方公司名称 (供应商/客户ID或名称)
    /// </summary>
    [Column("dfgsmc")]
    [StringLength(1000)]
    [Display(Name = "对方公司")]
    public string? Dfgsmc { get; set; }

    /// <summary>
    /// 是否有合同金额
    /// </summary>
    [Column("sfyhtje")]
    [Display(Name = "是否有合同金额")]
    public int? Sfyhtje { get; set; }

    /// <summary>
    /// 合同金额
    /// </summary>
    [Column("htje", TypeName = "decimal(38, 2)")]
    [Display(Name = "合同金额")]
    public decimal? Htje { get; set; }

    /// <summary>
    /// 合作内容/合同主要内容 (SQL Server Text 类型)
    /// </summary>
    [Column("hznr", TypeName = "text")]
    [Display(Name = "合作内容")]
    public string? Hznr { get; set; }

    /// <summary>
    /// 合同相关附件 (附件ID或路径)
    /// </summary>
    [Column("htjxgfj", TypeName = "text")]
    [Display(Name = "相关附件")]
    public string? Htjxgfj { get; set; }

    /// <summary>
    /// 是否需要盖章
    /// </summary>
    [Column("sfxygz")]
    [Display(Name = "是否需要盖章")]
    public int? Sfxygz { get; set; }

    /// <summary>
    /// 盖章日期 (char(10) 格式)
    /// </summary>
    [Column("gzrq")]
    [StringLength(10)]
    [Display(Name = "盖章日期")]
    public string? Gzrq { get; set; }

    /// <summary>
    /// 最终版合同 (文件ID或路径)
    /// </summary>
    [Column("zzbht", TypeName = "text")]
    [Display(Name = "最终版合同")]
    public string? Zzbht { get; set; }

    /// <summary>
    /// 是否已收质保金/保证金
    /// </summary>
    [Column("sfyzbj")]
    [Display(Name = "是否已收质保金")]
    public int? Sfyzbj { get; set; }

    /// <summary>
    /// 质保金/保证金金额
    /// </summary>
    [Column("zbj", TypeName = "decimal(38, 2)")]
    [Display(Name = "质保金金额")]
    public decimal? Zbj { get; set; }

    /// <summary>
    /// 合同类型 (备用/细分)
    /// </summary>
    [Column("htlx1")]
    [Display(Name = "合同类型(细分)")]
    public int? Htlx1 { get; set; }

    /// <summary>
    /// 是否需要走绝密级审批
    /// </summary>
    [Column("sfxyzjlsp")]
    [Display(Name = "是否需绝密审批")]
    public int? Sfxyzjlsp { get; set; }

    /// <summary>
    /// 合同约定金额预存制度
    /// </summary>
    [Column("htyfjeyczd", TypeName = "decimal(38, 2)")]
    [Display(Name = "约定金额预存制度")]
    public decimal? Htyfjeyczd { get; set; }

    /// <summary>
    /// 紧急程度
    /// </summary>
    [Column("jjcd")]
    [Display(Name = "紧急程度")]
    public int? Jjcd { get; set; }

    /// <summary>
    /// 特殊说明 (SQL Server Text 类型)
    /// </summary>
    [Column("tjsm", TypeName = "text")]
    [Display(Name = "特殊说明")]
    public string? Tjsm { get; set; }

    /// <summary>
    /// 职位权限/职务权限 (char(10) 格式)
    /// </summary>
    [Column("zwqx")]
    [StringLength(10)]
    [Display(Name = "职位权限")]
    public string? Zwqx { get; set; }

    /// <summary>
    /// 复用摘要/附注信息
    /// </summary>
    [Column("fzyc")]
    [StringLength(999)]
    [Display(Name = "复用摘要")]
    public string? Fzyc { get; set; }

    /// <summary>
    /// 草拟人/测试人 (SQL Server Text 类型)
    /// </summary>
    [Column("csr", TypeName = "text")]
    [Display(Name = "草拟人")]
    public string? Csr { get; set; }

    /// <summary>
    /// 需求关联合同
    /// </summary>
    [Column("xqglht")]
    [StringLength(1000)]
    [Display(Name = "需求关联合同")]
    public string? Xqglht { get; set; }

    /// <summary>
    /// 支付款比例
    /// </summary>
    [Column("zfkbl", TypeName = "decimal(38, 2)")]
    [Display(Name = "支付款比例")]
    public decimal? Zfkbl { get; set; }

    /// <summary>
    /// 印章类型 (SQL Server Text 类型)
    /// </summary>
    [Column("yzlx", TypeName = "text")]
    [Display(Name = "印章类型")]
    public string? Yzlx { get; set; }

    /// <summary>
    /// 本金点/比较点 (SQL Server Text 类型)
    /// </summary>
    [Column("bjd", TypeName = "text")]
    [Display(Name = "本金点")]
    public string? Bjd { get; set; }

    /// <summary>
    /// 关联签字盖章申请流程
    /// </summary>
    [Column("glqzgzsqlc")]
    [StringLength(4000)]
    [Display(Name = "关联签字流程")]
    public string? Glqzgzsqlc { get; set; }
}